package gae.testjig.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;
import com.google.web.bindery.event.shared.SimpleEventBus;

public class UITestJig extends Composite {

	interface UITestJigUiBinder extends UiBinder<Widget, UITestJig> {}
	private static UITestJigUiBinder uiBinder = GWT.create(UITestJigUiBinder.class);
	
	final private GaeTestJigServiceAsync SERVICE = GWT.create(GaeTestJigService.class);
	
	@UiField(provided=true) UIQueueTxTest uiQueueTxTest;
	@UiField(provided=true) UIJdoTest uiJdoTest;
	@UiField(provided=true) UIConstraintTest uiConstraintTest;

	public UITestJig() {
		final SimpleEventBus eventBus = new SimpleEventBus();
		final ChannelProvider cp = new ChannelProvider(SERVICE, eventBus);
		this.uiQueueTxTest = new UIQueueTxTest(SERVICE, cp.createClientChannel(), eventBus);
		this.uiJdoTest = new UIJdoTest(SERVICE, cp.createClientChannel(), eventBus);
		this.uiConstraintTest = new UIConstraintTest(SERVICE, cp.createClientChannel(), eventBus);
		initWidget(uiBinder.createAndBindUi(this));
	}

}
